import request from '@/utils/request'

// 查询实物质量分析列表
export function listAnalysis(query) {
  return request({
    url: '/quality/analysis/list',
    method: 'get',
    params: query
  })
}

// 查询实物质量分析详细
export function getAnalysis(id) {
  return request({
    url: '/quality/analysis/' + id,
    method: 'get'
  })
}

// 新增实物质量分析
export function addAnalysis(data) {
  return request({
    url: '/quality/analysis',
    method: 'post',
    data: data,
  })
}

// 修改实物质量分析
export function updateAnalysis(data) {
  return request({
    url: '/quality/analysis',
    method: 'put',
    data: data,
  })
}

// 删除实物质量分析
export function delAnalysis(id) {
  return request({
    url: '/quality/analysis/' + id,
    method: 'delete'
  })
}

// 查询预览分析报告列表
export function listAnalysisReport(query) {
  return request({
    url: '/quality/analysis/listReport',
    method: 'get',
    params: query
  })
}

// 查询top5列表
export function getTopList() {
  return request({
    url: '/quality/analysis/getTopList',
    method: 'get',
  })
}

// 查询top5列表
export function getTopPreview(ids) {
  return request({
    url: '/quality/analysis/getTopPreview/' + ids,
    method: 'get',
  })
}
